<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all.min.css" integrity="sha256-mUZM63G8m73Mcidfrv5E+Y61y7a12O5mW4ezU3bxqW4=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"tallgy.gitee.io","root":"/","images":"/images","scheme":"Muse","darkmode":false,"version":"8.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":false,"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"}}</script><script src="/js/config.js"></script>
<meta name="description" content="字体图标的制作​        首先。我们知道对于一个input输入框左右两边的一个小图标。一般会用一个常用的方法：字体图标 来进行显示。然后我们又从element ui的源码里面知道。字体图标是引入的。通过设置一个 font-face 来进行初始化一个 font-family。 ​        那么我们此时就先知道一个事情。那就是如何使用字体图标。 ​        但是我们此时就开始思考。那">
<meta property="og:type" content="article">
<meta property="og:title" content="字体图标的制作方法">
<meta property="og:url" content="http://tallgy.gitee.io/2022/02/03/%E9%9A%8F%E7%AC%94/%E5%AD%97%E4%BD%93%E5%9B%BE%E6%A0%87%E7%9A%84%E5%88%B6%E4%BD%9C%E6%96%B9%E6%B3%95/index.html">
<meta property="og:site_name" content="tallgy&#39;s blog">
<meta property="og:description" content="字体图标的制作​        首先。我们知道对于一个input输入框左右两边的一个小图标。一般会用一个常用的方法：字体图标 来进行显示。然后我们又从element ui的源码里面知道。字体图标是引入的。通过设置一个 font-face 来进行初始化一个 font-family。 ​        那么我们此时就先知道一个事情。那就是如何使用字体图标。 ​        但是我们此时就开始思考。那">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2022-02-03T08:31:18.000Z">
<meta property="article:modified_time" content="2023-06-25T08:57:29.338Z">
<meta property="article:author" content="tallgy">
<meta property="article:tag" content="随笔">
<meta name="twitter:card" content="summary">


<link rel="canonical" href="http://tallgy.gitee.io/2022/02/03/%E9%9A%8F%E7%AC%94/%E5%AD%97%E4%BD%93%E5%9B%BE%E6%A0%87%E7%9A%84%E5%88%B6%E4%BD%9C%E6%96%B9%E6%B3%95/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"http://tallgy.gitee.io/2022/02/03/%E9%9A%8F%E7%AC%94/%E5%AD%97%E4%BD%93%E5%9B%BE%E6%A0%87%E7%9A%84%E5%88%B6%E4%BD%9C%E6%96%B9%E6%B3%95/","path":"2022/02/03/随笔/字体图标的制作方法/","title":"字体图标的制作方法"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>字体图标的制作方法 | tallgy's blog</title>
  




  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <h1 class="site-title">tallgy's blog</h1>
      <i class="logo-line"></i>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>







</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%AD%97%E4%BD%93%E5%9B%BE%E6%A0%87%E7%9A%84%E5%88%B6%E4%BD%9C"><span class="nav-number">1.</span> <span class="nav-text">字体图标的制作</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AD%97%E4%BD%93%E5%9B%BE%E6%A0%87%E7%9A%84%E6%98%BE%E7%A4%BA"><span class="nav-number">1.1.</span> <span class="nav-text">字体图标的显示</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AD%97%E4%BD%93%E5%9B%BE%E6%A0%87%E7%9A%84%E7%94%9F%E6%88%90"><span class="nav-number">1.2.</span> <span class="nav-text">字体图标的生成</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#svg%E7%9A%84%E5%88%B6%E4%BD%9C"><span class="nav-number">1.3.</span> <span class="nav-text">svg的制作</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AD%97%E4%BD%93%E5%9B%BE%E6%A0%87%E7%9A%84%E7%94%9F%E6%88%90%E5%8E%9F%E7%90%86"><span class="nav-number">1.4.</span> <span class="nav-text">字体图标的生成原理</span></a></li></ol></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">tallgy</p>
  <div class="site-description" itemprop="description">只是一个知识的搬运工</div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">107</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">32</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">74</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



        </div>
      </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://tallgy.gitee.io/2022/02/03/%E9%9A%8F%E7%AC%94/%E5%AD%97%E4%BD%93%E5%9B%BE%E6%A0%87%E7%9A%84%E5%88%B6%E4%BD%9C%E6%96%B9%E6%B3%95/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="tallgy">
      <meta itemprop="description" content="只是一个知识的搬运工">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="tallgy's blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          字体图标的制作方法
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2022-02-03 16:31:18" itemprop="dateCreated datePublished" datetime="2022-02-03T16:31:18+08:00">2022-02-03</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">更新于</span>
        <time title="修改时间：2023-06-25 16:57:29" itemprop="dateModified" datetime="2023-06-25T16:57:29+08:00">2023-06-25</time>
      </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E9%9A%8F%E7%AC%94/" itemprop="url" rel="index"><span itemprop="name">随笔</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <h1 id="字体图标的制作"><a href="#字体图标的制作" class="headerlink" title="字体图标的制作"></a>字体图标的制作</h1><p>​        首先。我们知道对于一个input输入框左右两边的一个小图标。一般会用一个常用的方法：字体图标 来进行显示。然后我们又从element ui的源码里面知道。字体图标是引入的。通过设置一个 font-face 来进行初始化一个 font-family。</p>
<p>​        那么我们此时就先知道一个事情。那就是如何使用字体图标。</p>
<p>​        但是我们此时就开始思考。那么这个字体图标是怎么进行显示的呢。</p>
<h2 id="字体图标的显示"><a href="#字体图标的显示" class="headerlink" title="字体图标的显示"></a>字体图标的显示</h2><p>​        我们通过查阅资料后，首先知道了，文字的显示是通过一个unicode码，进行的编译。unicode码又被叫做万国码。其中对于 e000 到 f8ff 这个返回作为用户的专用区，所以我们也可以发现。对于自定义的字体图标的content里面都是 \e217 等等这种样子的。</p>
<h2 id="字体图标的生成"><a href="#字体图标的生成" class="headerlink" title="字体图标的生成"></a>字体图标的生成</h2><p>​        通过上面我们知道了第一个，那就是字体图标是使用的自定义专区。</p>
<p>​        然后就是我们要知道的第二个，字体图标是怎么生成的。</p>
<p>​        这里我就简单的直说了。</p>
<p>​        字体图标的生成。我们只需要对应的svg图片。然后通过使用一个转换方法进行转换。这里我说一个 <strong>阿里巴巴矢量图标库</strong> 的网站，它这个网站可以上传图标。然后就会自动给你生成打包好。不需要你自己的操作。</p>
<h2 id="svg的制作"><a href="#svg的制作" class="headerlink" title="svg的制作"></a>svg的制作</h2><p>​        知道了字体图标的生成是通过svg进行的。那么我们只需要制作svg图标即可。这个也很方便。最简单的我们可以直接使用网站上进行svg制作。但是这样就没有那么好。制作的不会那么精良。那么我们也可以使用专业的制作软件，比例PS。等进行制作。</p>
<h2 id="字体图标的生成原理"><a href="#字体图标的生成原理" class="headerlink" title="字体图标的生成原理"></a>字体图标的生成原理</h2><p>​        暂未了解。</p>
<p>​        我们知道，字体图标是通过svg进行的转换。但是这个中间的转换方法我还没有了解。</p>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/%E9%9A%8F%E7%AC%94/" rel="tag"># 随笔</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/2022/02/02/JQuery/JQuery%E5%AD%A6%E4%B9%A0/" rel="prev" title="JQuery学习">
                  <i class="fa fa-chevron-left"></i> JQuery学习
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/2022/02/04/CSS/css-hover%E5%92%8Cfocus%E9%A1%BA%E5%BA%8F/" rel="next" title="css-hover和focus顺序">
                  css-hover和focus顺序 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2023</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">tallgy</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/muse/" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
  </div>

    </div>
  </footer>

  
  <script src="https://cdn.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/schemes/muse.js"></script><script src="/js/next-boot.js"></script>

  





  





</body>
</html>
